<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
     <style>
       .text{
         width: 100px;
         /* overflow:hidden;
         text-overflow:ellipsis;
	       white-space:nowrap */
         white-space: nowrap;
         overflow: hidden;
         text-overflow: ellipsis;
       }
       .but{
         width: 100px;
         height: 100px;
       }
     </style>
  </head>
  <body>
    <div class="text">你好这是一大段文字，请你看看这些文字的长度有多少呢？</div>
    <button class="but">这是一个按钮</button>
    <input type="text">
    <input type="select">
  </body>
</html>